package com.ruoyi.tranShort.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.tranShort.mapper.ShortSentryPostMapper;
import com.ruoyi.tranShort.domain.ShortSentryPost;
import com.ruoyi.tranShort.service.IShortSentryPostService;

/**
 * 哨位管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-08-13
 */
@Service
public class ShortSentryPostServiceImpl implements IShortSentryPostService 
{
    @Autowired
    private ShortSentryPostMapper shortSentryPostMapper;

    /**
     * 查询哨位管理
     * 
     * @param id 哨位管理主键
     * @return 哨位管理
     */
    @Override
    public ShortSentryPost selectShortSentryPostById(Long id)
    {
        return shortSentryPostMapper.selectShortSentryPostById(id);
    }

    /**
     * 查询哨位管理列表
     * 
     * @param shortSentryPost 哨位管理
     * @return 哨位管理
     */
    @Override
    public List<ShortSentryPost> selectShortSentryPostList(ShortSentryPost shortSentryPost)
    {
        return shortSentryPostMapper.selectShortSentryPostList(shortSentryPost);
    }

    /**
     * 新增哨位管理
     * 
     * @param shortSentryPost 哨位管理
     * @return 结果
     */
    @Override
    public int insertShortSentryPost(ShortSentryPost shortSentryPost)
    {
        shortSentryPost.setCreateTime(DateUtils.getNowDate());
        return shortSentryPostMapper.insertShortSentryPost(shortSentryPost);
    }

    /**
     * 修改哨位管理
     * 
     * @param shortSentryPost 哨位管理
     * @return 结果
     */
    @Override
    public int updateShortSentryPost(ShortSentryPost shortSentryPost)
    {
        return shortSentryPostMapper.updateShortSentryPost(shortSentryPost);
    }

    /**
     * 批量删除哨位管理
     * 
     * @param ids 需要删除的哨位管理主键
     * @return 结果
     */
    @Override
    public int deleteShortSentryPostByIds(Long[] ids)
    {
        return shortSentryPostMapper.deleteShortSentryPostByIds(ids);
    }

    /**
     * 删除哨位管理信息
     * 
     * @param id 哨位管理主键
     * @return 结果
     */
    @Override
    public int deleteShortSentryPostById(Long id)
    {
        return shortSentryPostMapper.deleteShortSentryPostById(id);
    }
}
